package nz.ac.massey.jbuif.events;

import java.util.EventObject;


/**
 * Class BeanActionEvent
 * @author AMIR H KIOUMARS
 *
 */
public class BeanActionEvent extends EventObject {

	private static final long serialVersionUID = 1L;
	private Object bean = null;
	private BeanActions beanAction = null;

	
	/**
	 * BeanActionEvent
	 * @param source object source
	 * @param bean object bean
	 * @param beanAction BeanActions instance
	 */
	public BeanActionEvent(Object source, Object bean, BeanActions beanAction) {
		super(source);
		
		if(bean == null || beanAction == null)
			throw new IllegalArgumentException();
		
		this.bean = bean;
		this.beanAction = beanAction;
	}

	
	/**
	 * getBean get the bean
	 * @return the bean
	 */
	public Object getBean() {
		return bean;
	}
	
	
	/**
	 * getBeanAction get the bean action
	 * @return the bean action
	 */
	public BeanActions getBeanAction()
	{
		return beanAction;
	}
}
